package com.xjtu.weixin.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.xjtu.weixin.mapper.MpTextTemplateMapper;
import com.xjtu.weixin.model.entity.MpTextTemplate;
import com.xjtu.weixin.service.MpTextTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ${DESCRIPTION}
 *
 * @author 杨凯
 * @create 2018-09-03 14:55
 **/
@Service
@Slf4j
public class MpTextTemplateServiceImpl implements MpTextTemplateService {

	@Autowired
	MpTextTemplateMapper templateMapper;

	@Override
	public void addTextTemplate(MpTextTemplate textTemplate) {
		templateMapper.insert(textTemplate);
	}

	@Override
	public List<MpTextTemplate> getTextTemplateList() {
		return templateMapper.selectList(new EntityWrapper<>());
	}
}
